
root=Node()
axes = Node(root)
axes.Load("axes.osg")
axes.SetScale(10,10,10)

m = Morph(root)
m.Load("R7.osg",  "objskin_hi" )
m.AddTarget("R7_SmileOpen.osg")
m.AddTarget("R7_BlinkLeft.osg")
m.AddTarget("R7_Surprise.osg")
m.AddTarget("R7_SmileClosed.osg")
m.AddTarget("R7_Corrector.osg")

m.SetTargetWeight(0,0)
m.SetTargetWeight(1,0)
m.SetTargetWeight(2,0)
m.SetTargetWeight(3,0)
m.SetTargetWeight(4,1)
m.Update()

ha = Node(m)
ha.Load("R7_hair.osg")

viewer.SetRoot(root) 
viewer.SetFov(30)   
cm.Fit(m)    

cp_side = CameraPose (0.155197, 26.8451, -15.5425, 729.206, 107.844, 0.538792, 0.674246, 0.505069)
cp_front = CameraPose (0.155197, 26.8451, -15.5425, 729.206, 71.7937, 0.999779, -0.018626, 0.00976195)
cm.SetPose(cp_side)
#---------------------------------    
def cp():
    print "cp = CameraPose", cm.GetPose().Repr()
    
#---------------------------------    

def slide0():
        
    am.clear()
    Anim(T,1,    cm.SetPose, cp_side, cp_front )
    Anim2(T,1,   m.SetTargetWeights, Vec(0,0,0), Vec(1,0,0) )
    Anim2(T,0.2, m.SetTargetWeights, Vec(0,0,0), Vec(0,1,0) )
    Anim2(T,1,   m.SetTargetWeights, Vec(0,0,0), Vec(0,0,1) )
    am.play()
   

#---------------------------------    
slides = [
  ("Slide0---",slide0),
]


